/*
 * @Author: zhang ke
 * @Date: 2025-06-21 14:37:05
 * @LastEditors: your name
 * @LastEditTime: 2025-06-28 11:52:09
 * @Description: 统一管理用户的相关接口
 * @FilePath: \vue3-admin\src\api\user\index.ts
 */

import request from '@/utils/request'
import {type LoginFormData,type LoginResponseData,type UserResponseData} from './type'
//统一管理接口
enum API {
    LOGIN_URL = '/admin/acl/index/login',
    USERINFO_URL = '/admin/acl/index/info',
    LOGOUT_URL = '/admin/acl/index/logout'
}

// 暴露请求函数

// 登录接口方法
export const reqLogin = (data:LoginFormData)=>request.post<any,LoginResponseData>(API.LOGIN_URL,data)
//获取用户信息接口方法
export const reqUserInfo = () => request.get<any,UserResponseData>(API.USERINFO_URL);
//退出登录接口
export const reqLogOut = ()=>request.post<any, any>(API.LOGOUT_URL)
